package com.un.ebs.workOrder.domain;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;

import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.*;
import com.un.ebs.workOrder.enums.RoleTypeEnum;
import org.springframework.stereotype.Component;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 *
 * </p>
 *
 * @author liubo
 * @since 2020-03-04
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@Component
@TableName("tb_work_order")
public class WorkOrder extends Model<WorkOrder> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.UUID)
    private String id;

    private RoleTypeEnum createRoleType;

    private String createRoleId;

    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    private String createRemark;

    private Boolean createStatus;

    private String createOrderItemId;

    private String createAttach;

    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String acceptUserId;

    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String acceptUserName;

    private Date acceptTime;

    private Boolean acceptStatus;

    private String acceptRemark;

    private String acceptAttach;

    private String completeUserId;

    private String completeUserName;

    private Date completeTime;

    private Boolean completeStatus;

    private String completeRemark;

    private String completeAttach;

    private Integer evaluateScore;

    private String evaluateRemark;

    private Date evaluateTime;

    private Boolean evaluateStatus;

    @TableField(fill = FieldFill.INSERT)
    private String createAt;

    @TableField(fill = FieldFill.INSERT)
    private String createAtName;

    @TableLogic
    private Boolean isDelete;

    @TableField(fill = FieldFill.UPDATE)
    private Date lastModifiedTime;

    @TableField(fill = FieldFill.UPDATE)
    private String lastModifiedAt;

    @TableField(fill = FieldFill.UPDATE)
    private String lastModifiedAtName;

    private String tenantId;

    private Integer code;

    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String completeAuditDesc;

    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private Date completeAuditTime;

    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String completeAuditUserId;

    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String completeAuditUserName;

    private Date planCompleteTime;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}